	var now= new Date();  
	var year=now.getFullYear(); 
	var month=now.getMonth()+1; 

	/** *************定义教师列表数据************ */
	var teacherManageProxy = new Ext.data.HttpProxy({
		url: "teacher/teacherListAction!observerExecute"
	});
	var teacher = Ext.data.Record.create([
		{name: "id", type: "int", mapping: "id"},
		{name: "number", type: "string", mapping: "number"},
		{name: "name", type: "string", mapping: "name"},
		{name: "commentTime", type: "string", mapping: "commentTime"}
	]);
	var teacherManageReader = new Ext.data.JsonReader(
		{totalProperty: "totalProperty", root: "root"},
		teacher
	);
	var teacherManageStore = new Ext.data.Store({
		//baseParams: {yearmonth:year+"-"+month},  
		proxy: teacherManageProxy,
		reader: teacherManageReader
		// autoLoad:true
	});
	
	/** ***************定义行列模型***************** */

	// 列模型
	var cm = new Ext.grid.ColumnModel([
		new Ext.grid.RowNumberer(),
		{header: "教师编号", width: 120, dataIndex: "number",sortable:true},
		{header: "姓名", width: 80,dataIndex: "name",sortable:true},
		{header: "本月评阅次数", width: 100, dataIndex: "commentTime"}
	]);
	
	/** ***************定义面板的topBar和bottomBar***************** */
	var monthpicker = new Ext.ux.MonthPicker({
		id:"monthpicker"
	});
		
	var searchBtn = new Ext.Button({
		text:"查看",
		tooltip:"查看该月情况",
		id:"searchBtn",
		//iconCls:'icon-btn-add',
		handler:function(){
			var _yearmonth = monthpicker.getValue();		
			teacherManageStore.load({params: {start: 0, limit: 10,yearmonth:_yearmonth}});	
		}
	});
	var bbar = new Ext.PagingToolbar({
		store: teacherManageStore,
		pageSize: 10,// 页大小
		displayInfo: true,// 是否显示displayMsg
		displayMsg: "第{0}条到第{1}条,共{2}条",
		emptyMsg: "没有记录"// 如果没有记录，则显示该文本
	});
	
	/** ***************定义主体panel***************** */
	var teacherManageGrid = new Ext.grid.GridPanel({
		region:'center',
		closable:true,
		//title: "教师列表",
		width: 400,
		frame:true,		
		cm: cm,
		store: teacherManageStore,
		tbar:[monthpicker,"-",searchBtn],
		bbar:bbar
	});		
	
	Ext.onReady(function(){	
	
		Ext.BLANK_IMAGE_URL = "extjs/resources/images/default/s.gif";
	
		Ext.QuickTips.init();	
		
		var viewPort = new Ext.Viewport({
				layout : 'fit',
				items : [teacherManageGrid]　　　            
			});
		monthpicker.setValue(now);

		teacherManageStore.load({params: {start: 0, limit: 10,yearmonth:year+"-"+month}});		
	});